package hcn.protocol.brandnew.dengji.guahao;

import lombok.Data;
import javax.xml.bind.annotation.*;
import java.util.List;
import hcn.protocol.brandnew.BaseRequest;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import ctd.util.xml.jaxb.DateTimeAdapter;
import org.atag.sysrouter.annotation.DictionaryMapping;

import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;


/**
 * 门诊就诊状态查询-响应消息(成功) - ODS_02030004_SUC
 *
 * @author enjoyLife
 */
@Data
@XmlRootElement(name = "Data")
@XmlAccessorType(XmlAccessType.FIELD)
public class SyncOrderStateResponse {

    /**
     * 门诊就诊状态集合
     */
    @XmlElementWrapper(name = "SyncOrderStates")
    @XmlElement(name = "SyncOrderState")
    private List<SyncOrderState> syncOrderStates;

    @Data
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class SyncOrderState {

        /**
         * 就诊医疗机构组织机构代码
         */
        @XmlElement(name = "VisitOrganization")
        private String visitOrganization;
        /**
         * 医生排班流水号（排班标识）
         */
        @XmlElement(name = "ScheduleMark")
        private String scheduleMark;
        /**
         * 排班日期时间
         */
        @XmlElement(name = "ScheduleDateTime")
        @XmlJavaTypeAdapter(DateTimeAdapter.class)
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        private Date scheduleDateTime;
        /**
         * 结束时间
         */
        @XmlElement(name = "ScheduleEndDateTime")
        @XmlJavaTypeAdapter(DateTimeAdapter.class)
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        private Date scheduleEndDateTime;
        /**
         * 开始时间
         */
        @XmlElement(name = "ScheduleBeginDateTime")
        @XmlJavaTypeAdapter(DateTimeAdapter.class)
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        private Date scheduleBeginDateTime;
        /**
         * 挂号流水号
         */
        @XmlElement(name = "OutRegistryId")
        private String outRegistryId;
        /**
         * 预约记录流水号
         */
        @XmlElement(name = "AppointsId")
        private String appointsId;
        /**
         * 挂号状态代码
         */
        @XmlElement(name = "VisitStatus")
        @DictionaryMapping(id = "visitStatus")
        private String visitStatus;
    }

}
